import request from '@/utils/request'

export function trainList (query) {
    return request({
        url: '/system/trainRecord/list',
        method: 'post',
        data: query
    })
}

export function detailList (query) {
    return request({
        url: '/system/trainRecord/detailList',
        method: 'post',
        data: query
    })
}

export function updateTrainRecord () {
    return request({
        url: '/system/trainRecord/updateTrainRecord',
        method: 'get'
    })
}

export function getTrainBaseStatistics (query) {
    return request({
        url: '/system/project/getTrainBaseStatistics',
        method: 'post',
        data: query
    })
}

export function getTrainThemeList (query) {
    return request({
        url: '/system/theme/list',
        method: 'post',
        data: query
    })
}

export function addTrainTheme (query) {
    return request({
        url: '/system/theme/add',
        method: 'post',
        data: query
    })
}


export function editTrainTheme (query) {
    return request({
        url: '/system/theme/edit',
        method: 'post',
        data: query
    })
}


export function deleteTrainTheme (query) {
    return request({
        url: `/system/theme/delete`,
        method: 'get',
        params: query
    })
}


// 获取人员档案
export function userRecords (query) {
    return request({
        url: `/system/record/userRecords`,
        method: 'post',
        data: query
    })
}


//获取人员项目列表
export function userProjectRecords (query) {
    return request({
        url: `/system/record/userProjectRecords`,
        method: 'post',
        data: query
    })
}


//获取人员项目课程
export function userProjectCourseRecords (query) {
    return request({
        url: `/system/record/userProjectCourseRecords`,
        method: 'post',
        data: query
    })
}

// 项目档案
export function projectRecords (query) {
    return request({
        url: `/system/record/projectRecords`,
        method: 'post',
        data: query
    })
}

// 项目下的人员档案
export function projectUserRecords (query) {
    return request({
        url: `/system/record/projectUserRecords`,
        method: 'post',
        data: query
    })
}

// 导出人员档案
export function exportUserArchives (query) {
    return request({
        url: `/system/record/export/userArchives`,
        method: 'post',
        data: query
    })
}


// 导出项目人员档案 
export function exportProjectUserArchives (query) {
    return request({
        url: `/system/record/export/projectUserArchives`,
        method: 'post',
        data: query
    })
}

// 答题记录
export function getProjectExamRecord (query) {
    return request({
        url: `/system/record/getProjectExamRecord`,
        method: 'post',
        data: query
    })
}

// 导出培训档案
export function exportTrainPdf (query) {
    return request({
        url: `/system/record/export/exportTrainPdf`,
        method: 'post',
        data: query
    })
}

// 导出培训主题详情
export function getTrainThemeDetail (query) {
    return request({
        url: `/system/theme/getTrainThemeDetailById`,
        method: 'post',
        data: query
    })
}